import unittest

class DemoTestCase(unittest.TestCase):
    @unittest.skip('跳过用例的原因：无条件跳过')
    def test01(self):
        print('01')

    @unittest.skipIf(1==1,'跳过原因：条件成立就跳过')
    def test02(self):
        print('02')

    @unittest.skipUnless(1==2,'条件不成立就跳过，')
    def test03(self):
        print('03')

    @unittest.expectedFailure
    #断言结果就是异常
    def test04(self):
        self.assertEqual(1,2,'断言结果是异常')


if __name__ == '__main__':
    unittest.main(verbosity=2)
